<?php
    include_once '../model/config.php';
?>

<!DOCTYPE html>
<html manifest="index.appcache">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="user-scalable=no, width=device-width"/>
        <link rel="stylesheet" href="css/jquery.mobile-1.4.4/jquery.mobile-1.4.4.min.css">
        <link rel="stylesheet" href="css/jquery.mobile-1.4.4/jquery.mobile.structure-1.4.4.min.css">
        <link rel="stylesheet" href="css/jquery.mobile-1.4.4/jquery.mobile.inline-png-1.4.4.min.css">
        <link rel="stylesheet" href="css/jquery.mobile-1.4.4/jquery.mobile.inline-svg-1.4.4.min.css">
        <link rel="stylesheet" href="css/jquery.mobile-1.4.4/jquery.mobile.external-png-1.4.4.min.css">
        <!-- Choix du thème -->
        <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css">
        <link rel="stylesheet" href="css/bootstrap/jquery.mobile.icons.min.css">
        <!-- JavaScript -->
        <script src="js/jquery-1.11.1.min.js"></script>
        <script src="js/jquery.mobile-1.4.4.min.js"></script>
        <script src="js/interfaceAdmin.js"></script>
        
        <title>Admin Interface</title>
    </head>
    <body>
        
        <div data-role="page" id="interfaceAdmin" data-position="fixed">
            <div data-role="header" data-theme="c">
                <center>
                    <h1>Admin Interface</h1>
                    <a href="connexion.php" class="ui-btn ui-btn-right ui-btn-icon-right ui-corner-all ui-shadow ui-icon-home"> Home</a>
                </center>
            </div>

            <div data-role="main" class="ui-content">
                <!--URL -->
                <div id="form" >
                    <form id="ajaxURLForm" method="post">
                        <label for="URL"><h3>URL:</h3></label>
                        <input type="text" name="URL" id="URL" data-clear-btn="true">      
                        <fieldset id="typeCatego" data-role="controlgroup">
                              <legend><h3>Choisir la categorie:</h3></legend>
                              <label for="categorieBE">Projet</label>
                              <input type="radio" name="typeCategorie" id="categorieBE" value="Projet">
                              <label for="categorieExamen">Examen</label>
                              <input type="radio" name="typeCategorie" id="categorieExamen" value="Examen">	
                        </fieldset>
                        <input type="submit" data-theme="e" data-inline="true" name="submitURL" id="submitURL" value="OK" data-icon="check" data-iconpos="left">
                    </form>
                </div>
                
                <!--Management des BEs -->
                <div id="gestionBEs" align="center" data-theme="c">
                    <!--Liste des seances -->
                    <div id="listeBE"  style="float: left; margin-left: 100px;">
                            <div data-role="header" class="ui-corner-all ui-shadow ui-title" data-theme="c">
                                <center><h1>Liste des seances BEs/Examens</h1></center>
                            </div>
                            <div id="BE" data-role="content">
                                <form id="ajaxGroupBEForm" method="post">
                                    <input type="submit" data-theme="e" data-inline="true" name="submitSelectBE" id="submitSelectBE" value="Creer un Projet/Examen" data-icon="plus" data-iconpos="left">
                                </form>

                            </div>

                    </div>

                    <!--Liste des BEs créés-->
                    <div id="BEAnnee" style="float: right; margin-right: 100px">
                            <div data-role="header" class="ui-corner-all ui-shadow ui-title " data-theme="c">    
                                <center><h1>Liste des BEs/Examens chosies</h1></center>
                            </div>
                            <div id="classes">
                                <fieldset id="groupeClasse" data-role="controlgroup">
                                    <legend><h1>Groupe</h1></legend>
                                    <label for="groupe">Choisir votre groupe</label>

                                 <?php
                                             require_once '../controller/ClasseManager.php';
                                             include_once '../model/config.php';
                                             $manager = new ClasseManager($bdd);
                                             $listeClasse = $manager->getListeClasse();
                                             $index=1;
                                             echo "<select name=\"groupe\" id=\"groupe\" data-native-menu=\"false\">";

                                             foreach ($listeClasse as $classe){
                                                 echo "<option value=".$index.">".$classe."</option>";
                                                 $index++;
                                             }
                                             echo "</select>";
                                 ?>
                                 </fieldset>
                            </div>
                            
                            <div id="projects" data-role="content">

                            </div>
                            <div id="valigeGroupe" date-role="controlgroup">
                                <a id="valideButton1" name="valideButton1" class="ui-btn ui-btn-e ui-btn-inline ui-corner-all ui-icon-check ui-btn-icon-left" data-inline="true">Valider BEs</a>
                                <a id="valideButton2" name="valideButton2" class="ui-btn ui-btn-e ui-btn-inline ui-corner-all ui-icon-check ui-btn-icon-left" data-inline="true">Valider Examens</a>
                            </div>
                            
                   </div>
                   
                    
                </div>
                
                <!--Popups -->
                <div data-role="popup" id="popupConfirmDel" data-position-to="window">
                        <div data-role="header" >
                            <h1> Confirm Popup</h1>
                        </div>
                        <div data-role="main" class="ui-content">
                          <center><h3>Voulez vous vraiment le supprimer?</h3></center>
                          <a id="confirmButton" class="ui-btn ui-corner-all ui-shadow ui-btn-c ui-btn-inline ui-icon-check ui-btn-icon-left" data-rel="back">Oui</a>
                          <a id="confirmButton" class="ui-btn ui-corner-all ui-shadow ui-btn-e ui-btn-inline ui-icon-back ui-btn-icon-left" data-rel="back">Non</a>
                        </div>
                    
                </div>
                <div data-role="popup" id="popupConfirmValide" data-position-to="window">
                        <div data-role="header" >
                            <h1> Confirm Popup</h1>
                        </div>
                        <div data-role="main" class="ui-content">
                          <center><h3>Voulez vous valider votre choix?</h3></center>
                          <a id="confirmButton" class="ui-btn ui-corner-all ui-shadow ui-btn-c ui-btn-inline ui-icon-check ui-btn-icon-left" data-rel="back">Oui</a>
                          <a id="confirmButton" class="ui-btn ui-corner-all ui-shadow ui-btn-e ui-btn-inline ui-icon-back ui-btn-icon-left" data-rel="back">Non</a>
                        </div>
                    
                </div>
                <div data-role="popup" id="popupAlertRegroup1" data-position-to="window">
                        <div data-role="header" >
                            <h1> Warning Popup</h1>
                        </div>
                        <div data-role="main" class="ui-content">
                            <center><h3>Aucun URL - Aucun Projet/Examen!!!</h3></center>
                        </div>
                    
                </div>
                <div data-role="popup" id="popupAlertRegroup2" data-position-to="window">
                        <div data-role="header" >
                            <h1> Warning Popup</h1>
                        </div>
                        <div data-role="main" class="ui-content">
                            <center><h3>Aucun Seance choisie!!!</h3></center>
                        </div>
                </div>
                <div data-role="popup" id="popupAlertValidate" data-position-to="window">                 
                        <div data-role="header" >
                            <h1> Warning Popup</h1>
                        </div>
                        <div data-role="main" class="ui-content">
                            <center><h3>Aucun Projet/Examen choisie !!!</h3></center>
                        </div>
                </div>
            </div>
            
            <div data-role="footer" data-position="fixed" data-theme="c">
                <h1> &copy INSA TOULOUSE</h1>
                
            </div>
        </div>
        
    </body>
</html>

